﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using DoeObjects;
using System.Web.Mvc;
using DoeLibsMVC.Security;

namespace DoeLibsMVC.Models
{
    public class RenewExpireDateModel
    {
        [Required]
        [Display(Name = "Acceptor")]
        public int AcceptorId { get; set; }

        private List<User> _staffMembers = User.getUsersOfCategory(UserCategoryHelper.STAFF_CATEGORY);
        public IEnumerable<SelectListItem> StaffMembers
        {
            get
            {
                var dynStaffMembers = _staffMembers.Select(u => new { id = u.UserId, display = string.Format("{0} {1} ({2})", u.FirstName, u.LastName, u.Room) }).ToList();
                return new SelectList(dynStaffMembers, "id", "display");
            }
        }
    }
}